package com_fit.springboot_fit.repository;

import com_fit.springboot_fit.entity.AdminUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface AdminUserRepository extends JpaRepository<AdminUser, Integer> {

    // 根据登录名查询用户
    Optional<AdminUser> findByLoginName(String loginName);

    // 根据用户组ID查询用户
    Optional<AdminUser> findByGid(Integer gid);
}
